﻿namespace Douyu.SDK.Messages
{
    /// <summary>
    /// 弹幕消息
    /// </summary>
    public class ChatMessage : BaseMessage
    {
        public ChatMessage(BaseMessage msg) : base(msg)
        {
        }

        /// <summary>
        /// 房间ID
        /// </summary>
        public int rid
        {
            get { return GetValue(nameof(rid), 0); }
        }

        /// <summary>
        /// 分组号
        /// </summary>
        public int gid
        {
            get { return GetValue(nameof(gid), 0); }
        }

        /// <summary>
        /// 用户ID
        /// </summary>
        public int uid
        {
            get { return GetValue(nameof(uid), 0); }
        }

        /// <summary>
        /// 弹幕唯一ID
        /// </summary>
        public long cid
        {
            get { return GetValue(nameof(uid), 0); }
        }

        /// <summary>
        /// 用户昵称
        /// </summary>
        public string nn
        {
            get { return GetValue(nameof(nn), ""); }
        }


        /// <summary>
        /// 弹幕消息
        /// </summary>
        public string txt
        {
            get { return GetValue(nameof(txt), ""); }
        }

        /// <summary>
        /// 用户等级
        /// </summary>
        public long level
        {
            get { return GetValue(nameof(uid), 0); }
        }

        /// <summary>
        /// 礼物头衔
        /// </summary>
        public int gt
        {
            get { return GetValue(nameof(gt), 0); }
        }

        /// <summary>
        /// 颜色
        /// </summary>
        public long col
        {
            get { return GetValue(nameof(col), 0); }
        }

        /// <summary>
        /// 客户端类型
        /// </summary>
        public int ct
        {
            get { return GetValue(nameof(col), 0); }
        }

        /// <summary>
        /// 房间权限组
        /// </summary>
        public int rg
        {
            get { return GetValue(nameof(rg), 1); }
        }

        /// <summary>
        /// 房间权限组
        /// </summary>
        public RoomGroupType pg
        {
            get { return GetValue(nameof(pg), RoomGroupType.Normal); }
        }

        /// <summary>
        /// 酬勤等级
        /// </summary>
        public int dlv
        {
            get { return GetValue(nameof(dlv), 0); }
        }

        /// <summary>
        /// 酬勤数量
        /// </summary>
        public int dc
        {
            get { return GetValue(nameof(dc), 0); }
        }

        /// <summary>
        /// 最高酬勤等级
        /// </summary>
        public int bdlv
        {
            get { return GetValue(nameof(bdlv), 0); }
        }

    }

}
